#! /usr/bin/env python
# -*- coding:utf-8 -*-
# Author Jmz

class A:
    __x = 'A'   # _A__x
    def get_x(self):
        print(self.__x)


class A1(A):
    __x = 'A1'   # _A1__X

obj = A1()
obj.get_x()

'''
输出结果
A
'''

obj1 = A()

print(A.__dict__)
print(A1.__dict__)

'''
{'__module__': '__main__', '_A__x': 'A', 'get_x': <function A.get_x at 0x00000000024D9950>, '__dict__': <attribute '__dict__' of 'A' objects>, '__weakref__': <attribute '__weakref__' of 'A' objects>, '__doc__': None}
{'__module__': '__main__', '_A1__x': 'A1', '__doc__': None}
'''

